package com.liao.api;

import com.liao.domain.ResponseResult;
import com.liao.model.po.MovieUsers;
import com.liao.service.LoginServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 28580
 * @version 1.0
 * @description: TODO
 * @date 2023/7/21 19:17
 */
@RestController
public class LoginController {

    @Autowired
    private LoginServcie loginServcie;

    @PostMapping("/user/login")
    public ResponseResult login(@RequestBody MovieUsers user){
        return loginServcie.login(user);
    }


    @RequestMapping("/user/logout")
    public ResponseResult logout() {
        return loginServcie.logout();
    }

}
